
/* Generated by Interface Builder */

#import "SliderDualActingDemo.h"
#import "SliderDualActing.h"
#import "SliderCellFine.h"
#import <soundkit/Sound.h>
@implementation SliderDualActingDemo
+ new
{
	self = [super new];
	[NXApp setDelegate:self];
	return self;
}

- appDidInit:sender  // now everything is for sure initialized:
{
	// initialization code could go here as well....
    [[[[fontSlider setUpTarget:self action:@selector(action)]
    		setMax:360. allowHigher:YES min:2. allowLower:NO]
    		setAltStep:1. whole:YES default:12.]
			setFormat:NO left:3 right:0]; 
    [[[[slider1 setUpTarget:self action:@selector(action) isContinuous:YES]
    		setMax:10. allowHigher:YES min:-10. allowLower:YES]
    		setAltStep:1. whole:YES default:0.]
			setFormat:NO left:3 right:0]; 
    [[[[slider2 setUpTarget:self action:@selector(action)]
    		setMax:1. allowHigher:NO min:-1. allowLower:NO]
    		setAltStep:.01 whole:NO default:0.]
			setFormat:NO left:1 right:3]; 
     [[[[slider3 setUpTarget:self action:@selector(action) isContinuous:YES]
    		setMax:1000 allowHigher:NO min:0 allowLower:NO]
    		setAltStep:20 whole:NO default:500]
			setFormat:NO left:4 right:0]; 
     [[[[slider4 setUpTarget:self action:@selector(action) isContinuous:YES]
    		setMax:15. allowHigher:YES min:-15. allowLower:YES]
    		setAltStep:1. whole:YES default:0]
			setFormat:NO left:3 right:0]; 
    [[[[slider0 setUpTarget:self action:@selector(action)]
    		setMax:360. allowHigher:NO min:-360. allowLower:NO]
    		setAltStep:1. whole:YES default:0]
			setFormat:NO left:3 right:0]; 
	[[slider0 window]makeKeyAndOrderFront:self];
    return self;
}

- action
{
	// show we have sent a action
	static int num=0;
	static id snd = nil;
	if( [useSoundSwitch state]) {
		if (!snd) snd =[Sound newFromMachO:"clack.snd"];
		[snd play];
	} 
	[textField setIntValue:++num];
	return self;
}


- setUseSoundSwitch:anObject
{
    useSoundSwitch = anObject;
   return self;
}

- setSlider0:anObject
{
    slider0 = anObject;
   return self;
}

- setSlider1:anObject
{
    slider1 = anObject;
    return self;
}

- setSlider2:anObject
{
    slider2 = anObject;
    return self;
}

- setFontSlider:anObject
{
    fontSlider = anObject;
    return self;
}

- setSlider3:anObject
{
    slider3 = anObject;
   return self;
}

- setSlider4:anObject
{
    slider4 = anObject;
    return self;
}

- setTextField:anObject
{
    textField = anObject;
    return self;
}



@end
